Health Cloud Patient Data Synchronization LWC - Source
Setup guide
Dependencies
- Deploy either Health Cloud Patient Data Synchronization Process API - Implementation Template or Patient Summary - EMR integration and all of the system APIs that support it.
- Deploy Mule API QHIN Sync Process API - Implementation Template and all of the system APIs that support it.
Note: These APIs should be secured by Client ID Enforcement Policy with Credentials Orgin
as HTTP Basic Authentication Header
.
Installing Lightning Web Component to Salesforce
- Use the following URL to install this package in your Health Cloud enabled org. Login with the username and password for the org that you wish to install the package into. https://login.salesforce.com/packaging/installPackage.apexp?p0=04tDp000000m20ZIAQ
- Approve the install for
All Users
. - Step through the install wizard until the installation is complete.
Note: If you have a previous version of this LWC component already installed, you will need to uninstall 'Patient Sync LWC' package from the 'Setup - Installed Packages' section. You may alternatively install the lightning web component from source code by downloading the asset (.zip file) and then follow the instructions in the provided README.md file.
Salesforce configuration
Add LWC to Page
- Navigate to a page within Salesforce, where
patientSearch
needs to be set up. - Use the gear icon at the top right to select
Edit Page
. - Locate the
patientSearch
custom component and position it in the desired location on the page. - Save the page and exit the editor.
- Navigate to a page within Salesforce, where
Add Named Credentials and External Credentials
Perform the following steps for both the dependent applications:
- Log in to Anypoint Platform and select the appropriate
Business Group
. - Navigate to Runtime Manager and select the
Environment
where the applications are deployed. - Enter the name of the application deployed in the
Search Applications
option. - Click the application name, and then click
Settings
to configure the application. - Identify the
App url
for the application. You will need the URL to configure theNamed Credentials
in subsequent steps. - Navigate to
API Manager
. - Click
Client Applications
. - Search for the client application that is associated with the API instance of the application, and click on it.
- Copy the
Client Id
andClient Secret
from the Client applications details page. - Log in to your Salesforce Org to create named credentials and external credentials.
Click the gear icon and select
Setup
, then search forNamed Credentials
in theQuick Find
box.Follow the instructions on the Salesforce Documentation to create the named credentials and external credentials. Use the following names exactly for the named credentials to interact with the dependent Mule APIs and allow the namespacems_accel_hls
for callouts:- `PatientSync_Named_Credential` - `QHINSync_Named_Credential`
Note:The names for the named credentials cannot be changed because the component uses the names for making the specific callouts to the APIs.Ensure that the
Allowed Namespaces for Callouts
field includes the namespacems_accel_hls
while configuring the Named Credentials for both the dependent Mule APIs.
- Log in to Anypoint Platform and select the appropriate
LWC Configuration
To configure LWC, access the page from Setup
, enter Custom Metadata Types
in the Quick Find box
, and then click Patient Sync
. Next, click the Manage Patient Syncs
button, and then click the Edit
link for patientSync
. If the Source System you're using is Cerner, you can set that and click Save
.
Editing the source code
Modification of the source code requires that the Salesforce CLI toolset is installed on the local machine that's performing the install.
These steps assumes that you've already performed the installation of the Lightning Web Component into Salesforce org.
- First set up a new project directory to work in. See Create a Salesforce DX Project for instructions.
- Next authorize the org with the installed app. See the Salesforce Authorize an Org Using Web Server Flow for the cli instructions to set up your org.
- Next issue the following command which will pull the existing source code from the org and put it in the current directory under
patient-sync-app/main/default
.
sfdx force:source:retrieve -n patient-sync-app